package cn.itsource.org.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping("/hi")
    public String sayHi(Model model){
        System.out.println("---sayHi-----");
        model.addAttribute("hello","hello SpringBoot!!");
        return "hello";  // 走视图解析器   classpath:/templates/hello.html
    }
}
